<!DOCTYPE html>
<html lang="en" xmlns:v-bind="http://www.w3.org/1999/xhtml" xmlns:v-on="http://www.w3.org/1999/xhtml">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>

<!--创建一个绑定事件-->
<div id="app">
    <span v-bind:title="message">
        鼠标在此悬停查看此处数据
    </span>
</div>

<!--创建一个点击事件-->
<div id="app-1">
    <button v-on:click="test">提交</button>
</div>

<script src="https://cdn.jsdelivr.net/npm/vue"></script>

<script type="text/javascript">
    var vm = new Vue({
        el:"#app",
        data:{
            message: '页面加载与'+new Date().toLocaleString()
        }
    });
</script>

<!--声明一个函数 弹出消息体中内容-->
<script type="text/javascript">
    var vm = new Vue({
        el:"#app-1",
        data: {
            message: "消息"
        },
        methods: {
          test:function () {
              alert(this.message)
          }
        }
    });
</script>

</body>
</html>